<%@ page contentType="text/html;charset=UTF-8" %>
<%//@include file="../../common/sessionValidate.jsp" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML>
<html lang="UTF-8">
<head>
    <title>新闻信息维护</title>
    <%@ include file="../../common/meta.jsp" %>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="X-UA-Compatible" content="IE=9">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <link rel="stylesheet" href="<%=basePath%>css/my-bootstrap.css" media="screen" id="tuserskin">
    <link rel="stylesheet" href="<%=basePath%>js/toastr/toastr.css">
    <link rel="stylesheet" href="<%=basePath%>css/bootstrapValidator.min.css">
    <link rel="stylesheet" href="<%=basePath%>css/font-awesome.min.css">
    <!-- kind富文本编辑器  start-->
    <link rel="stylesheet" href="<%= basePath %>kindeditor/themes/default/default.css"/>
    <link rel="stylesheet" href="<%= basePath %>kindeditor/plugins/code/prettify.css"/>
    <script charset="utf-8" src="<%= basePath %>kindeditor/kindeditor.js"></script>
    <script charset="utf-8" src="<%= basePath %>kindeditor/lang/zh-CN.js"></script>
    <script charset="utf-8" src="<%= basePath %>kindeditor/plugins/code/prettify.js"></script>
    <!-- kind富文本编辑器  end-->
    <script type="text/javascript" src="<%= basePath %>js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="<%= basePath %>js/jquery.cookie.js"></script>
</head>
<style>
    hr {
        margin-top: 1px;
        border-bottom: 1px solid #1BBC9B;
    }
</style>
<script>
    var editor101; //后面赋值通过该全局变量执行；
    KindEditor.ready(function (K) {
        editor101 = K.create('textarea[name="editor101"]', {
            uploadJson: '<%= basePath %>upload/uploadFile',  //选择本地文件上传处理；
            fileManagerJson: '<%= basePath %>upload/uploadFileManager', //服务器文件浏览；
            allowFileManager: true,	//true时显示浏览远程服务器按钮。
            allowImageUpload: true	//true时显示图片上传按钮。
        });
        prettyPrint(); //google美化高亮显示富文本中html代码js；
    });
</script>
<body>
<form class="form-horizontal form-bordered form-row-strippe" name="ffAdd" id="ffAdd" mentod="post" role="form"
      data-toggle="validator" enctype="multipart/form-data">
    <div class="" style="margin-right:2px;padding-right:1px;">

        <!-------------------------- 面板  start--------------------------------->
        <div class="panel panel-primary">
            <div class="panel-heading clearfix" id="addHeaderDiv">
            </div>
            <div class="panel-body">
                <div class="row">
                    <h5>&nbsp;&nbsp;基本信息</h5>
                    <hr>
                    <div class="col-xs-6"><!--start 换列-->
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 楼栋名称</label>
                                <div class="col-xs-9">
                                    <input id="name" name="name" type="text" class="form-control" placeholder="name"/>
                                    <input id="buildingid" name="buildingid" type="hidden" />
                                    <input id="biztype" name="biztype" value="building" type="hidden" />
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">建筑面积</label>
                                <div class="col-xs-9">
                                    <input id="area" name="area" type="text" class="form-control" placeholder="area"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">楼层数</label>
                                <div class="col-xs-9">
                                    <input id="floornum" name="floornum" type="text" class="form-control"
                                           placeholder="floornum"/>
                                </div>
                            </div>
                        </div>

                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">招商联系人</label>
                                <div class="col-xs-9">
                                    <input id="linkman" name="linkman" type="text" class="form-control"
                                           placeholder="linkman"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">公摊率%</label>
                                <div class="col-xs-9">
                                    <input id="publicrate" name="publicrate" type="text" class="form-control"
                                           placeholder="70.0"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">照片</label>
                                <div class="col-xs-9">
                                    <input id="imgpath" name="imgpath" type="text" class="form-control"
                                           onclick="javascript:window.open('<%=basePath%>upload/toUploadOneFile2?fieldid=ext2','','status=yes,scrollbars=yes,location=no,top=300,left=500,width=420,height=300')"
                                           placeholder="请点击此处选择上传内容！" readonly="true"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <!--如果输入元素是奇数个元素，在n=size/2?int时输出2列格式；如果元素是奇数个，需要在n=size/2?int+1时输出2列格式；需要换列，每行最多显示2列-->
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 用途</label>
                                <div class="col-xs-9">
                                    <input id="useofbuilding" name="useofbuilding" type="text" class="form-control"
                                           placeholder="useofbuilding"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 招商联系电话</label>
                                <div class="col-xs-9">
                                    <input id="linktel" name="linktel" type="text"
                                           class="form-control" placeholder="linktel"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 账单提前提醒天数(天)</label>
                                <div class="col-xs-9">
                                    <input id="debtwarnday" name="debtwarnday" type="text"
                                           class="form-control" placeholder="30"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 备注</label>
                                <div class="col-xs-9">
                                    <input id="note" name="note" type="text" class="form-control"
                                           placeholder="note"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 附件</label>
                                <div class="col-xs-9">
                                    <input id="attach" name="attach" type="text" value="" class="form-control"
                                           onclick="javascript:window.open('<%=basePath%>upload/toUploadOneFile2?fieldid=ext1','','status=yes,scrollbars=yes,location=no,top=300,left=500,width=420,height=300')"
                                           placeholder="请点击此处选择上传内容！" readonly="true"/>
                                </div>
                            </div>
                        </div>
                    </div><!--end 换列-->
                </div><!--end row-->
            </div><!--end body-->
            <!--
            <div class="modal-footer bg-info " id='buttonDiv'>
            </div>-->
        </div>
        <!--------------------------面板 end------------------------------------>

        <!-------------------------- 合同默认参数 面板  start--------------------------------->
        <div class="panel panel-primary">
            <div class="panel-body">
                <div class="row">
                    <h5>&nbsp;&nbsp;合同信息默认设置</h5>
                    <hr>
                    <div class="col-xs-6">
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认租赁划分方式</label>
                                <div class="col-xs-9">
                                    <input id="ext1" name="ext1" type="text" value="按照起始日划分"
                                           class="form-control" placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认基础单价单位</label>
                                <div class="col-xs-9">
                                    <input id="contractfeeunit" name="contractfeeunit" type="text" value="元/平方米*天" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认计费类型</label>
                                <div class="col-xs-9">
                                    <input id="contractcounttype" name="contractcounttype" type="text" value="按季度/按月/按日" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认年天数</label>
                                <div class="col-xs-9">
                                    <input id="contractyeardays" name="contractyeardays" type="text" value="365" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认租赁数量单位</label>
                                <div class="col-xs-9">
                                    <input id="contractnumunit" name="contractnumunit" value="平方米" type="text"
                                           class="form-control" placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">租赁默认支付类型（几月一付）</label>
                                <div class="col-xs-9">
                                    <input id="contractpaytype" name="contractpaytype" type="text" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">默认提前付款天数</label>
                                <div class="col-xs-9">
                                    <input id="contractprepaydays" name="contractprepaydays" type="text" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">日期类型</label>
                                <div class="col-xs-9">
                                    <input id="contractdatetype" name="contractdatetype" type="text" value="工作日/自然日" class="form-control"
                                           placeholder="30"/>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>

        <!--------------------------合同信息面板 end------------------------------------>

        <!-------------------------- 能耗默认参数 面板  start--------------------------------->
        <div class="panel panel-primary">
            <div class="panel-body">
                <div class="row">
                    <h5>&nbsp;&nbsp;能耗信息默认设置</h5>
                    <hr>
                    <div class="col-xs-6"><!--start 换列-->
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 收费频率</label>
                                <div class="col-xs-9">
                                    <input id="energyfeeunit" name="energyfeeunit" type="text" value="按月/按季度"
                                           class="form-control" placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认计费类型</label>
                                <div class="col-xs-9">
                                    <input id="energycounttype" name="energycounttype" type="text" value="按季度/按月/按日" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认年天数</label>
                                <div class="col-xs-9">
                                    <input id="energyyeardays" name="energyyeardays" type="text" value="365" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认价格(元/平方米*天)</label>
                                <div class="col-xs-9">
                                    <input id="energyprice" name="energyprice" type="text" value="6.00" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <!--如果输入元素是奇数个元素，在n=size/2?int时输出2列格式；如果元素是奇数个，需要在n=size/2?int+1时输出2列格式；需要换列，每行最多显示2列-->
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认租赁数量单位</label>
                                <div class="col-xs-9">
                                    <input id="energynumunit" name="energynumunit" value="平方米" type="text"
                                           class="form-control" placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">租赁默认支付类型（几月一付）</label>
                                <div class="col-xs-9">
                                    <input id="energypaytype" name="energypaytype" value="3" type="text" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">默认提前付款天数</label>
                                <div class="col-xs-9">
                                    <input id="energyprepaydays" name="energyprepaydays" value="20"  type="text" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">默认提前付款天数日期类型</label>
                                <div class="col-xs-9">
                                    <input id="energydatetype" name="energydatetype" type="text" value="工作日/自然日" class="form-control"
                                           placeholder="30"/>
                                </div>
                            </div>
                        </div>

                    </div><!--end 换列-->
                </div><!--end row-->
            </div><!--end body-->
        </div>
        <!--------------------------能耗 面板 end------------------------------------>

        <!-------------------------- 物业 默认参数 面板  start--------------------------------->
        <div class="panel panel-primary">
            <div class="panel-body">
                <div class="row">
                    <h5>&nbsp;&nbsp;物业信息默认设置</h5>
                    <hr>
                    <div class="col-xs-6"><!--start 换列-->
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 收费单位</label>
                                <div class="col-xs-9">
                                    <input id="propertyfeeunit" name="propertyfeeunit" type="text" value="按月/按季度"
                                           class="form-control" placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认计费类型</label>
                                <div class="col-xs-9">
                                    <input id="propertycounttype" name="propertycounttype" type="text" value="按季度/按月/按日" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认年天数</label>
                                <div class="col-xs-9">
                                    <input id="propertyyeardays" name="propertyyeardays" type="text" value="365" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认价格(元/平方米*天)</label>
                                <div class="col-xs-9">
                                    <input id="propertyprice" name="propertyprice" type="text" value="5.00" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <!--如果输入元素是奇数个元素，在n=size/2?int时输出2列格式；如果元素是奇数个，需要在n=size/2?int+1时输出2列格式；需要换列，每行最多显示2列-->
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3"> 默认数量单位</label>
                                <div class="col-xs-9">
                                    <input id="propertynumunit" name="propertynumunit" value="平方米" type="text"
                                           class="form-control" placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">租赁默认支付类型（几月一付）</label>
                                <div class="col-xs-9">
                                    <input id="propertypaytype" name="propertypaytype" type="text" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">默认提前付款天数</label>
                                <div class="col-xs-9">
                                    <input id="propertyrepaydays" name="propertyprepaydays" value="10" type="text" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <label class="control-label col-xs-3">默认提前付款天数日期类型</label>
                                <div class="col-xs-9">
                                    <input id="propertydatetype" name="propertydatetype" type="text" value="工作日/自然日" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>

                    </div><!--end 换列-->
                </div><!--end row-->
            </div><!--end body-->
            <div class="modal-footer bg-info " id='buttonDiv'>
            </div>
        </div>
        <!--------------------------物业 面板 end------------------------------------>

        <!-- 模态框（Modal）start -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
             aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title" id="myModalLabel">提示</h4>
                    </div>
                    <div class="modal-body" id="myModalMessDiv"></div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal -->
        </div>
        <!-- 模态框（Modal）end -->
    </div>
</form>
</body>
</html>

<%!
    private String htmlspecialchars(String str) { //kindeditor去掉富文本中非法字符；
        str = str.replaceAll("&", "&amp;");
        str = str.replaceAll("<", "&lt;");
        str = str.replaceAll(">", "&gt;");
        str = str.replaceAll("\"", "&quot;");
        return str;
    }
%>
<script src="<%=basePath%>js/bootstrap.min.js"></script>
<script src="<%=basePath%>js/bootstrap-paginator.min.js"></script>
<script src="<%=basePath%>/js/respond.js"></script>
<script src="<%=basePath%>/js/html5.js"></script>
<script src="<%=basePath%>js/toastr/toastr.js"></script>
<script src="<%=basePath%>js/bootbox.js"></script>
<script src="<%=basePath%>js/jquery.validate.js"></script>
<script src="<%=basePath%>js/my-jquery-curd.js"></script>
<script src="<%=basePath%>js/tableSortTool.js"></script>
<script src="<%=basePath%>js/calendar.js"></script>
<script type="text/javascript">
    //新增保存数据
    function add() {
        $("#addSaveButton").attr("disabled", true);
        var url = "<%=basePath%>t_building/saveT_building?time=" + Math.random();
        var postData = $("#ffAdd").serializeArray();
        //alert(postData);
        $.post(url, postData, function (data) {
            //var data = $.parseJSON(data);
            if (data.result == "success") {
                //保存成功  1.关闭弹出层，
                showSuccessTips("恭喜保存成功!", "提示");
                history.goBack();
            } else {
                $("#addSaveButton").removeAttr("disabled");
                //showErrorTips("保存数据失败!", "错误信息：");
                $("#myModal").modal('show'); //hide;
                $("#myModalMessDiv").html("<font color='red'>对不起,保存数据失败，失败原因：" + data.info + "</font>");
                return false;
            }
        }).error(function () {
            $("#addSaveButton").removeAttr("disabled");
            //showErrorTips("保存数据失败!", "错误信息：");
            $("#myModal").modal('show'); //hide;
            $("#myModalMessDiv").html("<font color='red'>对不起,保存数据失败，失败原因：" + data.info + "</font>");
        });
    }

    //更新修改数据到后台
    function edit() {
        $("#editSaveButton").attr("disabled", true);
        var url = "<%=basePath%>t_building/updateT_building?time=" + Math.random();
        myEdit2(url);
    }

    //更新修改数据到后台并且启动工作流
    function tjsh() {
        $("#editSaveButton").attr("disabled", true);
        $("#tjshSaveButton").attr("disabled", true);
        var url = "<%=basePath%>t_building/tjshT_building?time=" + Math.random();
        myCurdTjsh(url);
    }

    //初始化页面及校验
    $().ready(function () {
        //1、初始化数据显示
        var name = "楼栋";
        var optype = '<%=request.getParameter("oplx")%>';
        var id = '<%=request.getParameter("id")%>';
        //alert("optype="+optype+";id="+id);
        if (optype == 'add') {
            $("#ffAdd")[0].reset();/*重置表单*/
            var basePath = "<i class='icon-plus'></i>&nbsp;";
            setHeader2("新增" + name, basePath);//设置addHeaderDiv标题文字及按钮
            setButtonDivAdd2();//设置adddiv的 操作按钮
        } else if (optype == 'edit') {
            var basePath = "<i class='icon-pencil'></i>&nbsp;";
            setHeader2("修改" + name, basePath);//设置addHeaderDiv标题文字及按钮
            //setButtonDivEdit2();//设置adddiv的 操作按钮
            setButtonDivEdit4();//设置adddiv的 操作按钮
            var url = "<%=basePath%>t_building/getT_building?id=" + id + "&time=" + Math.random();
            $.getJSON(url, function (data) {//获取数据，并且自动填充form，自动代码待修改； @todo;
                setValue(data);
                //alert($("#effect_date").val()+""+jsonDateFormat($("#effect_date").val()));
                //$("#effect_date").val(jsonDateFormat($("#effect_date").val())); //重新设置日期类型的值
            });
        } else if (optype == 'view') {
            var basePath = "<i class='icon-eye-open'></i>&nbsp;";//设置addHeaderDiv标题文字及按钮
            setHeader2("查看" + name, basePath);
            setButtonDivView2();//设置adddiv的 操作按钮
            var url = "<%=basePath%>t_building/getT_building?id=" + id + "&time=" + Math.random();
            $.getJSON(url, function (data) {//获取数据，并且自动填充form，自动代码待修改； @todo;
                setValue(data);
                //alert($("#effect_date").val()+""+jsonDateFormat($("#effect_date").val()));
                //$("#effect_date").val(jsonDateFormat($("#effect_date").val())); //重新设置日期类型的值
            });
            formReadOnly('ffAdd');//设置表单不可修改
        }

        //2、校验脚本初始化，start check
        $("#ffAdd").validate({
            submitHandler: function (form) {
                //alert($("#opType").val());
                if ($("#opType").val() == "add") {
                    add();
                } else if ($("#opType").val() == "edit") {
                    edit();
                }
            },
            rules: {
                buildingid: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                name: {
                    //required: true,
                    maxlength: 45
                },
                useofbuilding: {
                    //required: true,
                    maxlength: 45
                },
                floornum: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                area: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                ablearea: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                housenum: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                emptynum: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                linkman: {
                    //required: true,
                    maxlength: 45
                },
                linktel: {
                    //required: true,
                    maxlength: 45
                },
                ext1: {
                    //required: true,
                    maxlength: 45
                },
                ext2: {
                    //required: true,
                    maxlength: 45
                },
                ext3: {
                    //required: true,
                    maxlength: 45
                },
                ext4: {
                    //required: true,
                    maxlength: 45
                },
                ext5: {
                    //required: true,
                    maxlength: 45
                },
                ext6: {
                    //required: true,
                    maxlength: 45
                },
                creater: {
                    //required: true,
                    maxlength: 45
                },
                creattime: {
                    //required: true,
                    maxlength: 45
                },
                updater: {
                    //required: true,
                    maxlength: 45
                },
                updatetime: {
                    //required: true,
                    maxlength: 45
                },
                biztype: {
                    //required: true,
                    maxlength: 45
                },
                publicrate: {
                    //required: true,
                    maxlength: 45
                },
                imgpath: {
                    //required: true,
                    maxlength: 1024
                },
                note: {
                    //required: true,
                    maxlength: 1024
                },
                debtwarnday: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                memo: {
                    //required: true,
                    maxlength: 45
                },
                attach: {
                    //required: true,
                    maxlength: 1024
                },
                defaultpledgeunit: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                defaultzulinunit: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                defaultpledgeprice: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                pricecounttype: {
                    //required: true,
                    maxlength: 45
                },
                defaultdays: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                defaultpaymonth: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                defaultprepaydays: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                pledgetype: {
                    //required: true,
                    maxlength: 45
                },
                defaultpaymonth2: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                defaultwuyefei: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                wuyefeiprepaydays: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                prepaytype: {
                    //required: true,
                    maxlength: 45
                },
                wuyefeiyajindanwei: {
                    //required: true,
                    maxlength: 45
                },
                defaulenergytpaymonth: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                defaultenergyprice: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                energyprepaydays: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                energyprepaytype: {
                    //required: true,
                    maxlength: 45
                },
                wuyejifeitype: {
                    //required: true,
                    maxlength: 45
                },
                energytype: {
                    //required: true,
                    maxlength: 45
                },
                wuyedays: {
                    //required: true,
                    digits: true,
                    //minlength: 1,
                    maxlength: 11
                },
                feiyongname: {
                    //required: true,
                    maxlength: 256
                },
                rate: {
                    //required: true,
                    number: true,
                    //minlength: 1,
                    maxlength: 22
                },
                huowumingcheng: {
                    //required: true,
                    maxlength: 512
                },
                youhuizhengce: {
                    //required: true,
                    maxlength: 512
                },
                youhuizhengcename: {
                    //required: true,
                    maxlength: 45
                },
                buildingtype: {
                    //required: true,
                    maxlength: 45
                }
            }, //end rules;
            messages: {
                buildingid: {
                    //required: " buildingid不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> buildingid最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                name: {
                    maxlength: "<font color='red'> name最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                useofbuilding: {
                    maxlength: "<font color='red'> useofbuilding最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                floornum: {
                    //required: "楼层数不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'>楼层数最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                area: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'>建筑面积最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                ablearea: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> ablearea最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                housenum: {
                    //required: "房源数量不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'>房源数量最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                emptynum: {
                    //required: "空置数量不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'>空置数量最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                linkman: {
                    maxlength: "<font color='red'> linkman最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                linktel: {
                    maxlength: "<font color='red'> linktel最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext1: {
                    maxlength: "<font color='red'> ext1最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext2: {
                    maxlength: "<font color='red'> ext2最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext3: {
                    maxlength: "<font color='red'> ext3最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext4: {
                    maxlength: "<font color='red'> ext4最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext5: {
                    maxlength: "<font color='red'> ext5最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                ext6: {
                    maxlength: "<font color='red'> ext6最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                creater: {
                    maxlength: "<font color='red'> creater最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                creattime: {
                    maxlength: "<font color='red'> creattime最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                updater: {
                    maxlength: "<font color='red'> updater最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                updatetime: {
                    maxlength: "<font color='red'> updatetime最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                biztype: {
                    maxlength: "<font color='red'> biztype最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                publicrate: {
                    maxlength: "<font color='red'>公摊率最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                imgpath: {
                    maxlength: "<font color='red'> imgpath最大支持1,024位,输入的数据已经超过最大长度！</font>"
                },
                note: {
                    maxlength: "<font color='red'>备注最大支持1,024位,输入的数据已经超过最大长度！</font>"
                },
                debtwarnday: {
                    //required: " debtwarnday不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> debtwarnday最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                memo: {
                    maxlength: "<font color='red'> memo最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                attach: {
                    maxlength: "<font color='red'>附件最大支持1,024位,输入的数据已经超过最大长度！</font>"
                },
                defaultpledgeunit: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> defaultpledgeunit最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                defaultzulinunit: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> defaultzulinunit最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                defaultpledgeprice: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> defaultpledgeprice最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                pricecounttype: {
                    maxlength: "<font color='red'> pricecounttype最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                defaultdays: {
                    //required: " defaultdays不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> defaultdays最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                defaultpaymonth: {
                    //required: " defaultpaymonth不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> defaultpaymonth最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                defaultprepaydays: {
                    //required: " defaultprepaydays不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> defaultprepaydays最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                pledgetype: {
                    maxlength: "<font color='red'> pledgetype最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                defaultpaymonth2: {
                    //required: " defaultpaymonth2不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> defaultpaymonth2最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                defaultwuyefei: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> defaultwuyefei最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                wuyefeiprepaydays: {
                    //required: " wuyefeiprepaydays不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> wuyefeiprepaydays最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                prepaytype: {
                    maxlength: "<font color='red'> prepaytype最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                wuyefeiyajindanwei: {
                    maxlength: "<font color='red'> wuyefeiyajindanwei最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                defaulenergytpaymonth: {
                    //required: " defaulenergytpaymonth不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> defaulenergytpaymonth最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                defaultenergyprice: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> defaultenergyprice最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                energyprepaydays: {
                    //required: " energyprepaydays不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> energyprepaydays最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                energyprepaytype: {
                    maxlength: "<font color='red'> energyprepaytype最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                wuyejifeitype: {
                    maxlength: "<font color='red'> wuyejifeitype最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                energytype: {
                    maxlength: "<font color='red'> energytype最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                wuyedays: {
                    //required: " wuyedays不能为空！",
                    digits: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'> wuyedays最大支持11位，输入的数据已经超过最大长度！</font>"
                },
                feiyongname: {
                    maxlength: "<font color='red'>费用名称最大支持256位,输入的数据已经超过最大长度！</font>"
                },
                rate: {
                    //required: true,
                    number: "<font color='red'>请输入数字，不能输入非数字字符！</font>",
                    //minlength: "<font color='red'>最少输入1位！</font>",
                    maxlength: "<font color='red'>税率最大支持22位,输入的数据已经超过最大长度！</font>"
                },
                huowumingcheng: {
                    maxlength: "<font color='red'>货物名称最大支持512位,输入的数据已经超过最大长度！</font>"
                },
                youhuizhengce: {
                    maxlength: "<font color='red'> youhuizhengce最大支持512位,输入的数据已经超过最大长度！</font>"
                },
                youhuizhengcename: {
                    maxlength: "<font color='red'> youhuizhengcename最大支持45位,输入的数据已经超过最大长度！</font>"
                },
                buildingtype: {
                    maxlength: "<font color='red'> buildingtype最大支持45位,输入的数据已经超过最大长度！</font>"
                }
            } //end message;
        }); //end validate;
    }) //end funciton read;
</script>
